package com.culturalCenter.dataCenter.mapper.user;

import com.culturalCenter.dataCenter.entity.user.UserLocation;
import com.culturalCenter.dataCenter.entity.user.UserLocationPicture;
import com.culturalCenter.dataCenter.mapper.base.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * UserLocationPicture的Dao
 */
@Mapper
public interface UserLocationPictureMapper extends BaseMapper<UserLocationPicture> {

    /**
     * 通过用户id查询
     *
     * @param userId 用户id
     *
     * @return
     */
    List<UserLocationPicture> queryByUserId(@Param("userId") String userId);

    /**
     * 批量插入
     *
     * @param item
     */
    void insertBatch(List<UserLocationPicture> item);

    /**
     * 查询非签到的定位记录
     *
     * @param userLocationTime
     *
     * @return
     */
    List<UserLocation> selectUserLocation(@Param("userLocationTime") long userLocationTime);

    /**
     * 根据活动/培训查询图片
     *
     * @param userId
     * @param signInStartTime
     * @param signInEndTime
     *
     * @return
     */
    List<String> findListByUserAndDate(@Param("userId") String userId, @Param("signInStartTime") String signInStartTime, @Param("signInEndTime") String signInEndTime);

    /**
     * 与活动无关根据用户 场地 和日期查询图片
     *
     * @param userId
     * @param siteCode
     * @param date
     *
     * @return
     */
    List<String> findListByUserAndDateAndCode(@Param("userId") String userId, @Param("siteCode") String siteCode, @Param("date") String date);

}
